package com.tencent.sr.iris.activity.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 */
@AllArgsConstructor
@Getter
public enum TaskTypeEnum {
    COMMISSION_SHARETIME("COMMISSION_SHARETIME", "佣金与有效分享数目标任务"),
    BECOME_TRAINEE("BECOME_TRAINEE", "注册见习会员任务"),
    ;

    private final String code;
    private final String desc;

    public static TaskTypeEnum getByCode(String code) {
        for (TaskTypeEnum staff : TaskTypeEnum.values()) {
            if (staff.getCode().equals(code)) {
                return staff;
            }
        }
        return null;
    }
}
